cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

project(PRTTranslator)

find_path(MAYA_PATH REQUIRED)
set(MAYA_INCLUDE_PATH "${MAYA_PATH}/include")
set(MAYA_LIBRARY_PATH "${MAYA_PATH}/lib")

find_package(ZLIB REQUIRED)

if(MSVC)
	add_definitions(-DNT_PLUGIN)
else()
    add_definitions(-D_BOOL)
endif()
add_definitions(-DREQUIRE_IOSTREAM)

include_directories("${MAYA_INCLUDE_PATH}")
include_directories("${ZLIB_INCLUDE_DIRS}")
link_directories("${MAYA_LIBRARY_PATH}")

add_library(PRTTranslator SHARED PRTTranslator.h PRTTranslator.cpp)
target_link_libraries(PRTTranslator Foundation OpenMaya OpenMayaFX ${ZLIB_LIBRARIES})
set_target_properties(PRTTranslator PROPERTIES PREFIX "")

if(MSVC)
    set_target_properties(PRTTranslator PROPERTIES SUFFIX ".mll")
endif()
